package com.job.Gai_Yian.Homework0716;

import javax.sound.midi.Soundbank;
import java.util.Random;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-16 15:09:36
 */
public class SbfEX01 {
    public static void main(String[] args) {
        Random ran=new Random();
        String letters="ABCDEFGHIJKLMNOPQRSTUVWXVZ";
        long millis= System.currentTimeMillis();
        System.out.println(millis);
        StringBuffer sbf=new StringBuffer(String.valueOf(millis));
        int insertIndex=2;
        for (int i = 1; i <=5 ; i++) {
            sbf.insert(insertIndex,letters.charAt(ran.nextInt(letters.length())));
            insertIndex+=3;
        }
        System.out.println(sbf.toString());

        String str="iu7i8csr83sdf9";
        StringBuffer sbf2=new StringBuffer(str);
        StringBuffer num=new StringBuffer();
        for (int i=0;i<sbf2.length();i++){
            char ci=sbf2.charAt(i);
            if (Character.isDigit(ci)){
                num.append(ci);
            }
        }
        int i=Integer.parseInt(num.toString());
        System.out.println(i);
    }
}
